import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询人员列表
export function getBisPopulationInfoList(query) {
    return request({
        url: '/population/list',
        method: 'get',
        params: query
    })
}

// 获取人员信息
export function getBisPopulation(bisPopulationId) {
    return request({
        url: '/population/' + parseStrEmpty(bisPopulationId),
        method: 'get'
    })
}

// 新增人员
export function addBisPopulationInfo(data) {
    return request({
        url: '/population/add',
        method: 'post',
        data: data
    })
}

// 修改人员
export function updateBisPopulationInfo(data) {
    return request({
        url: '/population/update',
        method: 'post',
        data: data
    })
}

// 删除人员
export function delBisPopulationInfo(bisPopulationId) {
    return request({
        url: '/population/delete/' + bisPopulationId,
        method: 'get'
    })
}


// 查询家庭列表
export function getBisFamilyInfoList(query) {
    return request({
        url: '/population/family/list',
        method: 'get',
        params: query
    })
}

// 获取家庭信息
export function getBisFamily(familyId) {
    return request({
        url: '/population/family/' + parseStrEmpty(familyId),
        method: 'get'
    })
}

// 新增家庭
export function addBisFamilyInfo(data) {
    return request({
        url: '/population/family/add',
        method: 'post',
        data: data
    })
}

// 修改家庭
export function updateBisFamilyInfo(data) {
    return request({
        url: '/population/family/update',
        method: 'post',
        data: data
    })
}

// 删除家庭
export function delBisFamilyInfo(familyId) {
    return request({
        url: '/population/family/delete/' + familyId,
        method: 'get'
    })
}
